/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utils;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

/**
 *
 * @author Sostenes, Thiago, Felipe
 */
public class MessagesUtil {

    public static void addErrorMessage(Exception ex, String clientId) {
        FacesContext context = FacesContext.getCurrentInstance();
        context.addMessage(clientId, new FacesMessage(ex.getMessage()));
    }
}
